home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / tclib20.zip / TIMEHK.H < prev    next >
C/C++ Source or Header  |  1988-12-03  |  919b  |  25 lines

  1. /* TCHK 2.0 - Howard Kapustein's Turbo C library       12-3-88 */
  2. /* Copyright (C) 1988, Howard Kapustein.  All rights reserved. */
  3.  
  4. /* timehk.c  -  Howard Kapustein's time routines */
  5.  
  6. #ifndef TIMEHK_HEADER
  7. #define TIMEHK_HEADER   1
  8.  
  9. #include <howard.h>
  10.  
  11. /* function prototypes */
  12. int pause(int wait);         /* pause like delay or till keypress, returns scan code */
  13. char *timetostr(struct time *tsource, boolean seconds, boolean hundreds, boolean ampm);  /* convert time to string */
  14. struct time *strtotime(char *source);       /* convert a string to time */
  15. boolean time_convert(void *source, void *dest, int stype, int dtype);
  16.  
  17. #ifndef TIME_DEFINE
  18. #define isPM(hr)        ((hr>=12)?TRUE:FALSE)
  19. #define tohour(hr)      ((hr>12)?hr-12:(hr==0?12:hr))
  20. #define to24hour(hr)    ((hr==0)?24:hr) /* 0-23 = 24-hour clock */
  21. #define TIME_DEFINE     1
  22. #endif
  23.  
  24. #endif              /* TIMEHK_HEADER */
  25.